import request from '../utils/request'
// 登录code
export const login = (code) => request({
  url:'/api/index/get_openid',
  data:{
    code
  }
})
//登录用户信息
export const users = data => request({
  url:'/api/index/get_users',
  data
})

//查询店铺
export const getStore = uid => request({
  url:'/api/index/get_shop',
  data:{
    uid
  }
})

// 查询手机号
export const inqTel = uid =>request({
  url:'/api/index/shop_view',
  data:{
    uid
  }
})

// 获取手机号
export const getTel = data =>request({
  url:'/api/index/get_mobile',
  data
})

// 添加店铺
export const addShop = data =>request({
  url:'/api/index/shop_add',
  data
})

// 店铺切换营业状态
export const statusShop = data =>request({
  url:'/api/shop/edit_stattus',
  data
})
// 获取店铺信息
export const getShop = data =>request({
  url:'/api/shop/get_shop',
  data
})
// 添加优惠卷
export const addCard = data =>request({
  url:'/api/shop/card_add',
  data
})
// 优惠卷列表
export const cardList = data =>request({
  url:'/api/shop/card_list',
  data
})
// 下架优惠卷
export const card_stop = data =>request({
  url:'/api/shop/card_stop',
  data
})
// 添加员工扫码，获取用户信息
export const getXstop = data =>request({
  url:'/api/shop/get_userinfo',
  data
})
// 设置为管理员或者教练
export const addAdmin = data =>request({
  url:'/api/shop/admin_add',
  data
})
// 获取管理员或者教练列表
export const getAdmin = data =>request({
  url:'/api/shop/admin_list',
  data
})
// 删除管理员或者教练
export const removeAdmin = data =>request({
  url:'/api/shop/admin_del',
  data
})
// 添加会员扫码，获取用户信息
export const getShopVip = data =>request({
  url:'/api/shop/get_shopvip',
  data
})
// 设置为会员
export const addVip = data =>request({
  url:'/api/shop/add_vip',
  data
})
// vip列表
export const getVipList = data =>request({
  url:'/api/shop/vip_list',
  data
})
// 添加课程
export const addCourse = data =>request({
  url:'/api/shop/class_add',
  data
})
// 课程列表
export const getCourseList = data =>request({
  url:'/api/shop/class_list',
  data
})
// 删除课程
export const removeCourseList = data =>request({
  url:'/api/shop/class_stop',
  data
})
//添加时间段
export const addCourseTime = data =>request({
  url:'/api/shop/time_add',
  data
})
//时间段列表
export const getCourseTimeList = data =>request({
  url:'/api/shop/time_list',
  data
})
// 课程详情
export const getCourseDetail = data =>request({
  url:'/api/shop/class_detail',
  data
})
// 课程详情扫码
export const getCourseDetailQr = data =>request({
  url:'/api/shop/class_cash_add',
  data
})
// 课程详情同意
export const getCourseDetailQrqd = data =>request({
  url:'/api/shop/class_cash_adds',
  data
})
// 我的课程列表
export const getUserCourseList = data =>request({
  url:'/api/shop/my_class',
  data
})
// 获取时间段
export const getUserTime = data =>request({
  url:'/api/shop/get_time',
  data
})
// 删除时间段
export const removeUserTime = data =>request({
  url:'/api/shop/time_del',
  data
})
// 提交预约
export const getUserSubmitYy = data =>request({
  url:'/api/shop/pointment',
  data
})
// 待确认课程列表
export const getCourseListConfirm = data =>request({
  url:'/api/shop/point_class',
  data
})
// 确认预约课程
export const getCourseSubmit = data =>request({
  url:'/api/shop/audit_point',
  data
})
// 教练核销课程-二维码
export const getCourseClassQr = data =>request({
  url:'/api/shop/class_sm',
  data
})
// 教练核销课程立即核销-二维码
export const getCourseClassQrConfimg = data =>request({
  url:'/api/shop/destory_class',
  data
})
// 教练核销课程立即核销-二维码-历史核销
export const getCourseClassQrConfimgList = data =>request({
  url:'/api/shop/destory_history',
  data
})
// 商家端——添加门票
export const addTicket = data =>request({
  url:'/api/shop/ticket_add',
  data
})
// 商家端——门票列表
export const addTicketList = data =>request({
  url:'/api/shop/ticket_list',
  data
})
// 商家端——下架门票
export const addTicketDdit = data =>request({
  url:'/api/shop/ticket_edit',
  data
})
// 用户端——门票详情
export const getTicketsDetail = data =>request({
  url:'/api/shop/ticket_detail',
  data
})
// 用户端——商城列表
export const getShopList = data =>request({
  url:'/api/mall/index',
  data
})
// 用户端——商城详情
export const getShopEdtail = data =>request({
  url:'/api/mall/detail',
  data
})
// 用户端——收货地址
export const addMeSite = data =>request({
  url:'/api/mall/add_address',
  data
})
// 用户端——收货列表
export const addMeSiteList = data =>request({
  url:'/api/mall/address_list',
  data
})
// 用户端——收货列表默认
export const addMeSiteDefault = data =>request({
  url:'/api/mall/address_default',
  data
})
// 用户端——收货列表删除
export const addMeSiteDel = data =>request({
  url:'/api/mall/address_del',
  data
})
// 用户端——收货列表删除
export const getOrder = data =>request({
  url:'/api/mall/get_addr',
  data
})

//支付
export const orderSubmitFn = data =>request({
  url:'/api/mall/before_order',
  method:'POST',
  data
})
// 订单列表
export const getOrderList = data =>request({
  url:'/api/mall/myorder',
  data
})
// 订单详情
export const getOrderDetail = data =>request({
  url:'/api/mall/order_detail',
  data
})
// 查询门票
export const cancelTickets = data =>request({
  url:'/api/mall/get_ticket',
  data
})
// 门票核销
export const cancelTicketsSubmit = data =>request({
  url:'/api/mall/ticket_auto',
  data
})
// 门票核销记录
export const cancelTicketsList = data =>request({
  url:'/api/mall/ticket_history',
  data
})
// 店铺列表
export const getUserShopList = data =>request({
  url:'/api/mall/shop',
  data
})
// 店铺详情
export const getUserShopEdatil = data =>request({
  url:'/api/mall/shop_detail',
  data
})
// 门票列表
export const getUserShopTickets = data =>request({
  url:'/api/mall/ticket_list',
  data
})
// 商品搜索
export const getUserShopSerch = data =>request({
  url:'/api/mall/search',
  data
})
// 首页
export const getUserMallData = data =>request({
  url:'/api/mall/mall',
  data
})

// 收藏店铺
export const addshopCollect = data =>request({
  url:'/api/mall/shop_fav',
  data
})
// 收藏店铺
export const getshopCollectList = data =>request({
  url:'/api/mall/my_fav',
  data
})
// 收藏店铺列表
export const getshopCollectListCount = data =>request({
  url:'/api/mall/fav_count',
  data
})
// 门票订单
export const getshopTicketsList = data =>request({
  url:'/api/shop/order_list',
  data
})